package cn.ad.service;

import cn.ad.enumration.AdFormat;
import cn.ad.model.DropDownModel;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * 广告形式服务层实现
 * 
 * @author yujuan.zhang
 * @from 2016-06-15
 * @since V1.0
 *
 */
@Service
public class AdFormatService {

	/**
	 * 广告形式下拉列表获取
	 */
	public List<DropDownModel> getAdFormatDropDownList() {
		List<DropDownModel> list = new ArrayList<>();
		for (AdFormat format : AdFormat.values()) {
			if (format != AdFormat.ADFORMAT_VIDEO) {
				list.add(new DropDownModel(format.getValue(), format.getDescription()));
			}
		}
		return list;
	}

}
